source /etc/profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
  export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME="kphoen"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# [[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh
# autoload -U compinit && compinit -u
source $HOME/.oh-my-zsh/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"
PATH=~/object/frp_0.27.0_linux_amd64:/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH
# You may need to manually set your language environment
export LANG=zh_CN.UTF-8
# export GOROOT=/usr/local/go
# export PATH=$PATH:$GOROOT/bin

export GOS_UPSTREAM_ADDRESS='https://goproxy.io'
# export JAVA_HOME=/usr/share/jdk1.8.0_211  ## 这里要注意目录要换成自己解压的jdk 目录
# export JRE_HOME=${JAVA_HOME}/jre
# export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
# export PATH=${JAVA_HOME}/bin:$PATH

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"




cd_ll()
{
  # 使用‘\’可以调用原始命令
    \cd $1
    ls -ahl --color=auto
}

rerm()
{
    alias rm='remov1(){ /bin/rm -i $@; };remov1 $@'
}


nsc1()
{
    screen -L -t $1 -S $1;
}



alias m='cd /www/wwwroot/www.newbrandser.com'
alias gm='git merge'
alias chu='chgrp mysql ./ -R;chown mysql ./ -R;'
alias gra='gram(){ git remote add origin git@github.com:AlmondLee/$@; };gram $@'
alias chgo='chown www ./ -R;chgrp www ./ -R;'
alias rrrm='chattr -ia'
alias gpl='git pull origin'
alias gplm='gplm1(){ git pull git@github.com:AlmondLee/$@; };gplm1 $@'
alias go='gos'
alias gs='git status'
alias gsh='git show'
alias gcb='git checkout -b'
alias gd='git diff'
alias gr='git reset'
alias gl='git log'
alias gnb='git checkout -b'
alias gcl='git clone'
#'clo1(){ git clone https://github.com/$@; };clo1 $@'
alias gclm='clo2(){ git clone git@github.com:AlmondLee/$@; };clo2 $@'
alias mmi='make && make install'
alias vzc='vim ~/.zshrc'
alias czc='cp ~/.zshrc'
alias vvc='vim ~/.vimrc'
alias cbc='cp ~/.bashrc'
alias vbc='vim ~/.bashrc'
alias cvc='cp ~/.vimrc'
alias gck='git checkout'
alias gb='go -p 4 -o a.out build'

alias bkp='tar -cvf $@.tar $@ && xz -z -9 $@.tar && /bin/rm $@ -f'
alias gpp='gc master && gm dev && gp && gc dev'
alias mk='mkdi(){ mkdir $@; cd $@; };mkdi $@'
alias tg='bash ~/cofig/shs/tag.sh'
alias ee='export LANG=en_US.utf8'
alias ec='export LANG=zh_CN.UTF-8'
# alias lss='du -sh'
alias lss='du -h --max-depth=1 '
alias gp='git push origin'
alias gpm='gpum(){ git push -u git@github.com:AlmondLee/$@; };gpum $@'
alias tfx='tar xvf'
alias gac='git add -A;git commit -m'
alias gc='git checkout'
alias ga='git add -A'
alias cp='cp -i'
alias rm='move1(){ /bin/cp -rif $@ ~/backup/ && /bin/rm $@ -rf; };move1 $@'
#alias mv='mv -i'
alias ll='ls -a -l -h --color=auto'
alias stop='shutdown -h now'
alias cd..='cd ..'
alias cd='cd_ll'
alias cd.='cd ..'
alias v='vim'
alias sz='source ~/.zshrc'
alias sb='source ~/.bashrc'
alias rrm='lsrm(){ ls -alh $@ && echo "\n" && /bin/rm -ivvv $@; }; lsrm $@'
# alias rrm='rerm'
alias l='ll'
alias lll='ll'
alias c='cd'
alias fl='grep -i'
alias c.='cd..'
alias cd...='cd..'
alias ini='vim /www/server/php/73/etc/php.ini'
alias f='ffggg1(){ fg %$@; }; ffggg1 $@'
alias gin='git init;git checkout -b dev1'
alias yii='apt install'
alias dii='dpkg -i'
alias ysc='apt search'
alias yud='apt update -y;apt upgrade -y'
alias gab='git branch -r | grep -iv "\->" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done && git fetch --all'
alias iop='iotop -d 3'
alias op='top -c -d 3'
alias mf='/bin/bash ~/cofig/shs/makeFast.sh'
alias goo='googler --proxy localhost:8889 -c zh -l zh -n 5'
alias kpa='/bin/bash ~/cofig/shs/kill_all.sh'
alias sc='screen'
alias n='screen -L -t `date +D%y.%m.%dT%H:%M:%S` -S `date +D%y.%m.%dT%H:%M:%S`'
alias nsc='screen -L -t `date +D%y.%m.%dT%H:%M:%S` -S `date +D%y.%m.%dT%H:%M:%S`'
alias lsc='screen -ls'
alias r='screen -r'
alias rsc='screen -r'
alias sp='ps -ef|grep -i'
alias watch='watch -d'
alias lcr='chmod +x '
alias csc='rm /var/run/screen/S-root/*'
alias nd='mkdir'
alias wsc='screen -wipe'
alias sf='find ./ -iname '
alias s='ssh root@127.0.0.1'
alias up='unset https_proxy;unset ALL_RPOXY; unset http_proxy;'
alias cs='ssh -o ServerAliveInterval=30 root@134.175.53.19'
alias gclean='sudo git clean  -d  -fx ""'
alias frp='nohup frpc -c ~/object/frp_0.27.0_linux_amd64/frpc.ini &'
alias jp='xdotool key Num_Lock'
alias pscp=parallel-scp
alias prsync=parallel-rsync
alias pnuke=parallel-nuke
alias pslurp=parallel-slurp
alias pssh=parallel-ssh
alias dist='cd /www/wwwroot/dist && git pull origin && /bin/rm /www/wwwroot/my_project.cn/public/product.html -f && /bin/rm /www/wwwroot/my_project.cn/public/static -rf && cp ./* /www/wwwroot/my_project.cn/public/ -rf'
# alias pro='export ssr_pro="192.168.98.226:8889"; export https_proxy=$ssr_pro; export http_proxy=$ssr_pro; export ftp_proxy=$ssr_pro; export ALL_PROXY=$ssr_pro; export all_proxy=$ssr_pro; export HTTP_PROXY=$ssr_pro; ; export HTTPS_PROXY=$ssr_pro; '
alias pro='export ssr_pro="http://127.0.0.1:8889"; export https_proxy=$ssr_pro; export http_proxy=$ssr_pro; export ftp_proxy=$ssr_pro; export ALL_PROXY=$ssr_pro; export all_proxy=$ssr_pro; export HTTP_PROXY=$ssr_pro; ; export HTTPS_PROXY=$ssr_pro; '
# alias pro='unset https_proxy; unset http_proxy; unset ftp_proxy; unset ALL_PROXY; unset all_proxy; unset HTTP_PROXY; unset HTTPS_PROXY'
alias a='http --pretty'
alias pcg='c /home/adl/object/myzsh/oh-my-zsh && gac "s" && gp && c -'
alias gfm='sf *.go|xargs gofmt -w'
alias plcg='c /home/adl/object/myzsh/oh-my-zsh && gpl master && c -'
alias c-='c -'
alias .c='cd ..'
alias jfm='python -mjson.tool'
alias bb='kill -STOP'
alias ff='kill -CONT'
alias sa='su adl'
alias cp='cp -vvv'
alias xxz='xz -vvv'
alias xz='xz --memlimit-compress=45% -vvv'
# alias zx='tar -cf - $@ | xz --memlimit-compress=45% -T 0 -9 -c > "output.tar.xz"'
# alias zx='tar -Jcf output.tar.xz'
alias ad='su adl'
alias ca='cd /home/adl'
alias al='alias'
# alias g='gg(){axel $@ || wget $@;}; gg $@;'
alias gg='wget'
alias g='axel -v'
alias postman='nohup /usr/Postman/Postman &'
alias le='less'
alias tfc='tar xvf'
alias dd='dd status=progress'
alias npm='npm -proxy "http://127.0.0.1:8889"'
alias ggt='gos get -v'


# alias xxz='xxxz(){export xxz_name=$@ && tar cvf $@.tar $@ && xz --memlimit-compress=45% -vvv -9 -T 0 $@.tar;}; xxxz $@'
# alias xxz='export xxz_name=$@ && tar cvf $@.tar $@ && xz --memlimit-compress=45% -vvv -9 -T 0 $@.tar'



# proxy="http://127.0.0.1:8118"
# export https_proxy=$proxy
# export http_proxy=$proxy
# export ftp_proxy=$proxy
# privoxy --user privoxy /etc/privoxy/config
# export http_proxy=http://127.0.0.1:1080
# export https_proxy=http://127.0.0.1:1080
# export ALL_PROXY=http://127.0.0.1:1080#

# export ssr_pro="http://127.0.0.1:8889"
# export https_proxy=$ssr_pro
# export http_proxy=$ssr_pro
# export ftp_proxy=$ssr_pro
# export ALL_PROXY=$ssr_pro
# export all_proxy=$ssr_pro
# export HTTP_PROXY=$ssr_pro
# export HTTPS_PROXY=$ssr_pro

export GOPROXY="http://127.0.0.1:8889"
unset proxyserveraddr
unset proxyserverport
unset HTTP_PROXY
unset HTTPS_PROXY
unset FTP_PROXY
unset SOCKS_PROXY
unset NO_PROXY
unset http_proxy
unset https_proxy
unset ftp_proxy
unset socks_proxy
unset no_proxy
unset ALL_PROXY
unset all_proxy














setopt nonomatch
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && cd && cd .oh-my-zsh/plugins && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
source $HOME/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# /bin/bash ~/cofig/shs/new_screen.sh

# if [ ! -z ${STY} ];then
    # echo "\n\n\n\n\nin SCREEN  ${STY}"
# else
    # screen -R
# fi
    # screen -L -t `date +D%y.%m.%dT%H:%M:%S` -S `date +D%y.%m.%dT%H:%M:%S`
 # -L -t `date +D%y.%m.%dT%H:%M:%S` -S `date +D%y.%m.%dT%H:%M:%S`
#. "/root/.acme.sh/acme.sh.env"
